<include file="public@header" />
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li><a href="{:url('course/index')}">课程列表</a></li>
        	<li class="active"><a href="{:url('course/add')}">新增课程</a></li>
		</ul>
		<form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('course/add')}">
			<div class="form-group">
				<label class="col-sm-2 control-label">
					<span class="form-required">*</span>课程名称
				</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" name="title">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">
					<span class="form-required">*</span>课程封面
				</label>
				<div class="col-md-6 col-sm-10">
					<input type="hidden" name="image" id="thumb" value="">
                    <a href="javascript:uploadOneImage('图片上传','#thumb');">
                        <img src="__TMPL__/public/assets/images/default-thumbnail.png" id="thumb-preview"
                             width="135" style="cursor: hand"/>
                    </a>
                    <input type="button" class="btn btn-sm"
                           onclick="$('#thumb-preview').attr('src','__TMPL__/public/assets/images/default-thumbnail.png');$('#thumb').val('');return false;"
                           value="取消图片">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">
					<span class="form-required">*</span>课程说明
				</label>
				<div class="col-md-6 col-sm-10">
					<textarea class="form-control" name="description" style="height:300px;"></textarea>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-offset-2 col-sm-10">
					<button type="submit" class="btn btn-primary js-ajax-submit">{:lang('ADD')}</button>
				</div>
			</div>
		</form>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
</body>
</html>